/**
 * 套餐页面相关API
 */
import request from "@/utils/request";
import env from "@/utils/env";
import { getItem } from "@/utils/localStorage";

// 查询套餐数据
// export const comboMeal = (pageNo, pageSize, shopId) => {
//   return request({
//     url: `/cloth/package/getPackageInfoPage?pageNo=${pageNo}&pageSize=${pageSize}&shopId=${shopId}`,
//     method: "GET",
//   });
// };
export const comboMeal = (pageNo, pageSize) => {
  return request({
    url: `/cloth/package/getPackageInfoPage?pageNo=${pageNo}&pageSize=${pageSize}`,
    method: "GET",
  });
};

// 点赞套餐
export const giveLove = (packageId, unLiked) => {
  return request({
    url: `/cloth/like/liked/${packageId}/${unLiked}`,
    method: "GET",
  });
};

// 查询套餐详情
export const comboMealDetails = (id) => {
  return request({
    url: `/cloth/package/getPackageInfoDetail/${id}`,
    method: "GET",
  });
};

// 查询套餐
export const selectSearch = (keyword, shopId = 1, pageNo = 1, pageSize = 5) => {
  return request({
    url: `/cloth/package/search?pageNo=${pageNo}&pageSize=${pageSize}&shopId=${shopId}&keyword=${keyword}`,
    method: "GET",
  });
};
